package com.shop.milk_tea_shop.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author yjw
 * @since 2024-06-16
 */
@TableName("item_info_table")
@ApiModel(value = "ItemInfo对象", description = "")
public class ItemInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("商品id，5位数，后80%")
    @TableId(value = "item_id", type = IdType.AUTO)
    private Long itemId;

    @ApiModelProperty("商品名称")
    private String itemName;

    @ApiModelProperty("所属分类id")
    private Long categoryId;

    @ApiModelProperty("单价")
    private Double price;

    @ApiModelProperty("商品展示富文本信息，存储图片或视频文件信息")
    private String elements;

    @ApiModelProperty("商品附加信息")
    private String addtion;

    @ApiModelProperty("状态，0：已下架，1：正在售卖中，2：已售罄")
    private Integer status;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("创建用户")
    @TableField(fill = FieldFill.INSERT)
    private Long createUserId;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime alterTime;

    @ApiModelProperty("修改用户")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long alterUserId;

    @ApiModelProperty("扩展字段")
    private String extraParameter;

    public Long getItemId() {
        return itemId;
    }

    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getElements() {
        return elements;
    }

    public void setElements(String elements) {
        this.elements = elements;
    }

    public String getAddtion() {
        return addtion;
    }

    public void setAddtion(String addtion) {
        this.addtion = addtion;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public LocalDateTime getAlterTime() {
        return alterTime;
    }

    public void setAlterTime(LocalDateTime alterTime) {
        this.alterTime = alterTime;
    }

    public Long getAlterUserId() {
        return alterUserId;
    }

    public void setAlterUserId(Long alterUserId) {
        this.alterUserId = alterUserId;
    }

    public String getExtraParameter() {
        return extraParameter;
    }

    public void setExtraParameter(String extraParameter) {
        this.extraParameter = extraParameter;
    }

    @Override
    public String toString() {
        return "ItemInfo{" +
            "itemId = " + itemId +
            ", itemName = " + itemName +
            ", categoryId = " + categoryId +
            ", price = " + price +
            ", elements = " + elements +
            ", addtion = " + addtion +
            ", status = " + status +
            ", createTime = " + createTime +
            ", createUserId = " + createUserId +
            ", alterTime = " + alterTime +
            ", alterUserId = " + alterUserId +
            ", extraParameter = " + extraParameter +
        "}";
    }
}
